<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div id="navigation" class="navbar navbar-default navbar-fixed-top ">
<div class="container">
	<div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-home"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
		<a class="navbar-brand" href="">
		<b>开心吧</b></a>
	</div>

       <div class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
            <li ><a href="topic!latesttopic "><i class="glyphicon glyphicon-tasks"></i> 首页</a></li>
            <li><a href="section!listAll">
            <i class="glyphicon glyphicon-th"></i> 版块</a></li>
            <li ><a href="home!member">会员</a></li>
            <li><a href="topic!latesttopic">开源项目</a></li>
            
           </ul>
           <form class="navbar-form navbar-left" style="margin-top: 8px;" action="topic!searchTopic" method="post" target="_blank">
           <div class="form-group">
		        <input type="text" class="form-control" name="ttopic" placeholder="Search for...">
		    </div>
		</form>
		
          <ul class="nav navbar-nav navbar-right">
           <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="0" data-close-others="false" href="#">
                     Blog
                            <i class="fa fa-angle-down"></i>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="active"><a href="blog.html">Blog Page</a></li>
                            <li><a href="blog_item.html">Blog Item</a></li>
                        </ul>
                    </li>
 			<c:if test="${user.uname==null}">
            <li><a href="user!tologin">登入</a></li>
            <li><a href="user!toreg">注册</a></li>
            <li><a style="padding-top: 11px;overflow:hidden;" href=""><img src="common/images/qq_login.png" /></a></li>
            </c:if>
            
            <c:if test="${user.uname!=null}">
			<c:if test="${user.uremark!=null}">
			 <li class=""><a>${user.uremark}</a></li> 	
			 </c:if>
			<c:if test="${user.uremark==null}">
		 	<li class=""><a href="">${user.uname}</a></li> 
		 	<li class=""><a>您好</a></li>
		 	 </c:if>
			<li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="glyphicon glyphicon-user"></i> ${user.uname} <span class="caret"></span></a>
                <ul class="dropdown-menu" role="menu">
                  <li><a href="user!setProfile?uid=${user.uid}"><i class="glyphicon glyphicon-cog"></i> 用户设置</a></li>
                  <li><a href="user!logout" onclick=" return confirm('确定退出？')"><i class="glyphicon glyphicon-off"></i> 退出</a></li>
                 <c:if test="${user.umark!=0&&user.umark!=null}"> 
                  <li><a href="admin!sectionList"><i class="glyphicon glyphicon-new-window"></i> 管理后台</a></li>
                  </c:if>
                  <li class="divider"></li>
                  <li class="dropdown-header">测试中未完成</li>
                  <li><a href="sign!tosign">签到</a></li>
                  <li><a href="#">我的收藏</a></li>
                  <li><a href="#">帮助中心</a></li>
                </ul>
              </li>
			</c:if>
          </ul>
        </div>
</div>
</div>